
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
About the Script view </TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp65.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp67.htm" >Next</A>
<!-- End Header -->
<A NAME="X-REF342976002"></A><h1>About the Script view </h1>
<A NAME="TI1888"></A><p>You use the Script view to code functions and events, define
your own functions and events, and declare variables and external
functions. </p>
<A NAME="TI1889"></A><p>Script views are part of the default
layout in the Application, Window, User Object, Menu, and Function
painters. In Application, Window, and User Object painters, the
initial layout has one Script view that displays the default event
script for the object and a second Script view set up for declaring
instance variables. You can open as many Script views as you need,
or perform all coding tasks in a single Script view. </p>
<A NAME="TI1890"></A><h4>Title bar</h4>
<A NAME="TI1891"></A><p>The Script view's title bar shows the name and return
type of the current event or function, as well as the name of the
current control for events and the argument list for functions.
If the Script view is being used to declare variables or functions,
the titlebar shows the type of declaration.</p>
<A NAME="TI1892"></A><h4>Drop-down lists</h4>
<A NAME="TI1893"></A><p>There are three drop-down lists at the top of the Script view: </p>
<br><img src="images/ui23.gif">
<A NAME="TI1894"></A><p>In the first list, you can select the object, control, or
menu item for which you want to write a script. You can also select
Functions to edit function scripts or Declare to declare variables
and external functions. </p>
<A NAME="TI1895"></A><p>The second list lets you select the event or function you
want to edit or the kind of declaration you want to make. A script
icon next to an event name indicates there is a script for that
event, and the icon's appearance tells you more about the
script:</p>
<A NAME="TI1896"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 7-1: Script icons in the Script view</caption>
<tr><th  rowspan="1"  ><A NAME="TI1897"></A>If there is a script</th>
<th  rowspan="1"  ><A NAME="TI1898"></A>The script icon displays</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1899"></A>For the current object or control </td>
<td  rowspan="1"  ><A NAME="TI1900"></A>With text</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1901"></A>In an ancestor object or control only</td>
<td  rowspan="1"  ><A NAME="TI1902"></A>In color</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1903"></A>In an ancestor as well as in the object
or control you are working with</td>
<td  rowspan="1"  ><A NAME="TI1904"></A>Half in color</td>
</tr>
</table>
<A NAME="TI1905"></A><p>The same script icons display in the Event List view.</p>
<A NAME="TI1906"></A><p>The third list is available in descendent objects. It lists
the current object and all its ancestors so that you can view scripts
in the ancestor objects.</p>
<A NAME="TI1907"></A><h4>Toggle buttons for Prototype and Error windows</h4>
<A NAME="TI1908"></A><p>A Prototype window displays at the top of the Script view
when you define a new function or event. An Error window displays
at the bottom of the view when there are compilation errors. You
can toggle the display of these windows with the two toggle buttons
to the right of the lists. </p>
<br><img src="images/codscr02.gif">
<A NAME="TI1909"></A><p>For more information about the Prototype window, see <A HREF="pbugp74.htm#CDECDFID">Chapter 8, "Working with User-Defined Functions ,"</A> and <A HREF="pbugp79.htm#BFCBCEEE">Chapter 9, "Working with User Events ."</A></p>

